package text.adventure.data;
import java.util.ArrayList;
import java.util.List;


public class TextCommand {

	private boolean fromPlayer;
	private String verb;
	private String[] objects;
	
	public TextCommand(boolean fromPlayer, String verb)
	{
		this.fromPlayer = fromPlayer;
		this.verb = verb;
	}
	
	public TextCommand(boolean fromPlayer, String verb, List<String> objects)
	{
		this.fromPlayer = fromPlayer;
		this.verb = verb;
		this.objects = objects.toArray(new String[objects.size()]);
	}
	
	public TextCommand(String verb, String[] objects)
	{
		this.verb = verb;
		this.objects = objects;
	}
	
	public boolean isFromPlayer() {
		return fromPlayer;
	}

	public String getVerb() {
		return verb;
	}

	public void setVerb(String verb) {
		this.verb = verb;
	}

	public String[] getObjects() {
		return objects;
	}

	public List<TextObj> getTextObj() {
		//TODO
		return new ArrayList<TextObj>();
	}
	
	public void setObjects(String[] objects) {
		this.objects = objects;
	}
	
	public void setObject(int index, String object)
	{
		this.objects[index] = object;
	}
	
	public String getObject(int index)
	{
		return this.objects[index];
	}
	
}
